package com.xdl.moudle.shiro.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xdl.moudle.shiro.dao.MenuDao;
import com.xdl.moudle.shiro.dao.OperationDao;
import com.xdl.moudle.shiro.dao.RoleDao;
import com.xdl.moudle.shiro.domain.Menu;
import com.xdl.moudle.shiro.domain.Operation;
import com.xdl.moudle.shiro.domain.Role;
import com.xdl.moudle.shiro.service.iface.UserPermissionsService;

@Service("UserPermissionsService")
public class UserPermissionsServiceImpl implements UserPermissionsService{

	@Autowired
	private MenuDao menuDao;
	@Autowired
	private OperationDao operationDao;
	@Autowired
	private RoleDao roleDao;
	
	@Override
	public List<Menu> queryMenuByUid(String uid) {
		return menuDao.queryMenuByUid(uid);
	}

	@Override
	public List<Role> queryRoleByUid(String uid) {
		return roleDao.queryRoleByUid(uid);
	}

	@Override
	public List<Operation> queryOperationByUid(String uid, String menuId) {
		return operationDao.queryOperationByUid(uid, menuId);
	}

}
